"""
This script is to delete all the files which has been put in the svn code base(versioned).
And it's easy to add the files to a new code base
"""
import os
import shutil

curdir = os.path.abspath(os.path.dirname(__file__))

def removedir(dirname, name = ".svn"):
    if os.path.isdir(dirname):
        for file in os.listdir(dirname):
            if os.path.isdir(os.path.join(dirname, file)) and file == name:
                thedir = os.path.join(dirname, name)
                shutil.rmtree(thedir)
                print ".",
            else:
                removedir(os.path.join(dirname, file))

#if __name__ == "__main__":
if __name__ == '__main__':
    t = ['locale']
    for item in t:
        target = os.path.join(curdir, item)
        removedir(target)

    
